<?php
namespace plugins\member\controller;
use cmf\controller\PluginRestBaseController;
use plugins\member\model\CommModel;
use think\Db;

class ApiTestController extends PluginRestBaseController
{

	public function getAppAuthCode()
	{
		$commModel =  new CommModel();
        $param['user_id'] = '5004473';
        $commModel->orderSyn($param);
	}

	/**
     * 根据code值拿到用户信息
     */
	public function getLoginByCode(){
        $param = $this->request->post();
        if(!empty($param['auth_code'])){
            $commModel =  new CommModel();
            $commModel->getUserInfo($param['auth_code']);
        }
        return zy_json_echo(false,"登录失败!",'',300);
    }

    /**
     * 根据userid值拿到用户信息
     */
    public function getLoginByUserId(){
        $param = $this->request->post();
        if(!empty($param['userid'])){
            $commModel =  new CommModel();
            $commModel->getUserInfoByUserId($param['userid']);
        }
        return zy_json_echo(false,"登录失败!",'',300);
    }

}
